home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / minix / update~4.z / update~4 / lib_stdio_README.UP2 < prev    next >
Encoding:
Internet Message Format  |  1989-09-06  |  1.5 KB

  1. From: cechew@bruce.OZ (Earl Chew)
  2. Newsgroups: comp.os.minix
  3. Subject: Minix stdio patch 2 - 0 of 2
  4. Keywords: stdio, patches
  5. Message-ID: <1511@bruce.OZ>
  6. Date: 6 Sep 89 01:25:51 GMT
  7. Organization: Monash Uni. Computer Science, Australia
  8. Lines: 36
  9.  
  10.  
  11. This new set of patches tries to patch up some lint problems. The major fixes
  12. are to do with atexit() and exit().
  13.  
  14. The ordering for the library could be generated using lorder and tsort. The
  15. line from Makefile.unx specifies how this is done:
  16.  
  17.     ar cr $(STDIO) `lorder $(LIBOBJ) | tsort` $(EXIT)
  18.  
  19. where STDIO, LIBOBJ and EXIT are:
  20.  
  21. STDIO=    stdio.a
  22. LIBOBJ=    _allocbu.o _filbuf.o _file.o _flsbuf.o \
  23.     _fopen.o _slot.o atexit.o fclose.o \
  24.     fdopen.o fflush.o fgetc.o fgets.o \
  25.     fopen.o fprintf.o fputc.o fputs.o \
  26.     fread.o freopen.o fscanf.o fseek.o \
  27.     ftell.o fwrite.o gets.o getw.o \
  28.     printf.o puts.o putw.o rewind.o \
  29.     scanf.o setbuf.o setvbuf.o sprintf.o \
  30.     sscanf.o stdio.o ungetc.o vfprintf.o \
  31.     vfscanf.o vprintf.o vscanf.o vsprintf.o \
  32.     vsscanf.o
  33. EXIT=    exit.o _fakfls.o
  34.  
  35. With the full library it would be necessary to combine the rest of the library
  36. objects with LIBOBJ. The last two files in the library should be those in
  37. EXIT.
  38.  
  39. For those cross compiling under MsDos and using .lib libraries, the only way
  40. that I have found that works consistently is to split the library into two
  41. parts. libc.lib contains LIBOBJ and the rest of the library. exit.lib contains
  42. only EXIT. When linking specify libc.lib first then exit.lib. Have a look in
  43. Makefile.dos for some inspiration.
  44.  
  45. Earl
  46.